Skip to content

[SPARK-52472] Regenerate Spark Connect-generated Swift source code with protoc-gen-grpc-swift-2 #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jun 13, 2025

What changes were proposed in this pull request?

This PR aims to regenerate Spark Connect-generated Swift source code with protoc-gen-grpc-swift-2.

$ which protoc-gen-grpc-swift-2
/opt/homebrew/bin/protoc-gen-grpc-swift-2

Why are the changes needed?

These files are manually generated from v4.0.0 tag by the following standard procedures.

$ git clone -b v4.0.0 https://github.com/apache/spark.git
$ cd spark/sql/connect/common/src/main/protobuf/
$ protoc --swift_out=. spark/connect/*.proto
$ protoc --grpc-swift_out=. spark/connect/*.proto

// Remove empty GRPC files
$ git grep 'This file contained no services'
spark/connect/catalog.grpc.swift:// This file contained no services.
spark/connect/commands.grpc.swift:// This file contained no services.
spark/connect/common.grpc.swift:// This file contained no services.
spark/connect/example_plugins.grpc.swift:// This file contained no services.
spark/connect/expressions.grpc.swift:// This file contained no services.
spark/connect/ml.grpc.swift:// This file contained no services.
spark/connect/ml_common.grpc.swift:// This file contained no services.
spark/connect/relations.grpc.swift:// This file contained no services.
spark/connect/types.grpc.swift:// This file contained no services.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the CIs.

Was this patch authored or co-authored using generative AI tooling?

No.

reservedRanges: [1..<3],
numberNameMappings: [
3: .same(proto: "hash"),
])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only non-trivial change.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-52472] Regenerate Spark Connect-generated Swift source code with protoc-gen-grpc-swift-2 [SPARK-52472] Regenerate Spark Connect-generated Swift source code with protoc-gen-grpc-swift-2 Jun 13, 2025
@@ -1887,15 +1887,11 @@ extension Spark_Connect_Expression: SwiftProtobuf.Message, SwiftProtobuf._Messag
var _common: Spark_Connect_ExpressionCommon? = nil
var _exprType: Spark_Connect_Expression.OneOf_ExprType?

#if swift(>=5.10)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, wonder why it removed the version check condition.

Copy link
Member Author

@dongjoon-hyun dongjoon-hyun Jun 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's removed because Swift-GRPC supports Swift 5.10+ only now, @viirya .

Swift 6.2 feature freeze was started too and Swift-GRPC will support Swift 6.1+ only when 6.2 is out.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, Apache Spark Connect for Swift starts with Swift 6.0+.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-52472 branch June 13, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants